const headerSticky = document.querySelector('.header-sticky')
window.addEventListener('scroll', function () {
  if (document.documentElement.scrollTop > 53) {
    headerSticky.classList.add('show')
  } else {
    headerSticky.classList.remove('show')
  }
})

const btn = document.querySelector('.showswitchs')

const switchs = document.querySelector('.switchs')
const closeA = document.querySelector('.icon-close-new')

btn.addEventListener('click', function () {
  switchs.style.display = 'block'
})

closeA.addEventListener('click', function (e) {
  e.preventDefault()
  switchs.style.display = 'none'
})

const cancel = document.querySelector('.cancel')
cancel.addEventListener('click', function () {
  switchs.style.display = 'none'
})
const affirm = document.querySelector('.affirm')
affirm.addEventListener('click', function () {
  switchs.style.display = 'none'
})

